<template>
  <img class="session_head" v-if="!(type == null || type <= 0 || type > 4)" :src="headImages[type-1]" :style="{width: width+'px',height: height+'px'}">
</template>

<script>
  import icon_head1 from '@/assets/image/head/icon_head1.png'
  import icon_head2 from '@/assets/image/head/icon_head2.png'
  import icon_head3 from '@/assets/image/head/icon_head3.png'
  import icon_head4 from '@/assets/image/head/icon_head4.png'

  export default {
    name: "HeadImage",
    props: {
      width: {
        type: Number,
        default: 58
      },
      height: {
        type: Number,
        default: 58
      },
      type: {
        type: Number,
        default: null
      }
    },
    data() {
      return {
        headImage: icon_head1,
        headImages: [
          icon_head1,icon_head2,icon_head3,icon_head4
        ]
      }
    }
  }
</script>

<style lang="scss" scoped>
  @import './index.scss';
</style>

